package com.dreamlike.demo.HttpUtil.Annotation.Core;

import com.dreamlike.demo.HttpUtil.Core.Generator.HttpDefinitionGenerator;
import com.dreamlike.demo.HttpUtil.Enum.ContentType;
import com.dreamlike.demo.HttpUtil.Enum.RequestMethod;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.net.http.HttpClient;

//todo
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Request {
    String baseUri();
    RequestMethod method() default RequestMethod.GET;
    boolean isAsync() default false;
    String requestContentType() default ContentType.APPLICATION_JSON;
    String responseContentType() default ContentType.APPLICATION_JSON;
    int timeoutSeconds() default 10;
    HttpClient.Version version() default HttpClient.Version.HTTP_1_1;
    String executorName() default HttpDefinitionGenerator.DEFAULT_EXECUTOR_NAME;
}
